﻿using DMSkin.Core.MVVM;
using DMSkin.WeChat.API;
using DMSkin.WeChat.Model;
using DMSkin.WeChat.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace DMSkin.WeChat.ViewModel
{
    public class FriendPageViewModel : ViewModelBase
    {
        private List<Group> groups = new List<Group>()
        {
            new Group(){ Id = 1, Groupname = "新的朋友",
                Amigos = new List<Amigo>() { new Amigo() { Id=1, Name="新的朋友",Image= "../Image/nf.png" } } },
            new Group(){ Id = 2, Groupname = "公众号",
                Amigos = new List<Amigo>() { new Amigo() { Id = 1, Name = "公众号", Image = "../Image/gzh.png" } } },
            new Group(){ Id = 3, Groupname = "企业号",
                Amigos = new List<Amigo>() { new Amigo() { Id = 1, Name = "企业号", Image = "../Image/qyh.png" } } },
            new Group(){ Id = 4, Groupname = "群聊",
                Amigos = new List<Amigo>()
            {
                new Amigo() { Id = 1, Name = ".Net开发群", Image = "../Image/Head/head1.jpg" },
                new Amigo() { Id = 2, Name = "C#开发群", Image = "../Image/Head/head2.jpg" },
                new Amigo() { Id = 3, Name = "WPF技术群", Image = "../Image/Head/head3.jpg" }}
            },
            new Group(){ Id = 5, Groupname = "A",
                Amigos = new List<Amigo>()
            {
                new Amigo() { Id = 1, Name = "张三", Image = "../Image/Head/head1.jpg" },
                new Amigo() { Id = 2, Name = "李四", Image = "../Image/Head/head2.jpg" },
                new Amigo() { Id = 3, Name = "王五", Image = "../Image/Head/head3.jpg" }}
            }
        };

        public List<Group> Groups
        {
            get { return groups; }
            set
            {
                groups = value;
                OnPropertyChanged("Groups");
            }
        }

        /// <summary>
        /// 当前页面
        /// </summary>
        private Page currentPage = new EmptyPage();

        public Page CurrentPage
        {
            get { return currentPage; }
            set
            {
                currentPage = value;
                OnPropertyChanged("CurrentPage");
            }
        }
    }
}
